<template>
  <FormItem :label="label" :prop="prop" :icon="icon" :single="single">
    <NumberInput :type="type" :precision="precision" :max="max" :min="min" :model-value="modelValue"
      @input="updateValue" :readonly="see || readonly" />
  </FormItem>
</template>
<script>
export default {
  name: "FormNumber",
  mounted() {
  },
  props: {
    label: "",
    prop: "",
    type: {
      default: "text"
    },
    value:{},
    modelValue: {},
    single: {
      default: false
    },
    icon: {
      default: ""
    },
    readonly: {
      default: false
    },
    precision: {
      default: 0
    },
    max: {
    },
    min: {
    }
  },
  computed: {
    see() {
      return this.$store.forms.see;
    }
  },
  methods: {
    updateValue(newValue) {
      this.$emit("update:modelValue", newValue);
    }
  }
};
</script>